/***********************************************************************
    filename:   DaterMainGroupWindow.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for MainGroupWindow objects in UI
*************************************************************************/
#ifndef _DaterMainGroupWindow_h_
#define _DaterMainGroupWindow_h_

#include "DaterMainWindow.h"
#include "DaterGroup.h"

class MainGroupWindow : public MainWindow
{
	/* !
	\brief
		The Events in Day version.
	*/
public:
		/* !
		\brief
			Construct the sample of class MainCalendarDayWindow.

		\param id_name
			- a string to represent the prefix of the window.
			
		\param parent
			- point to parent window.
		*/
	MainGroupWindow(const CEGUI::String& new_name, Dater::Group* relatedGroup, CEGUI::Window* parent = 0);
	
		/* !
			Destructor of class MainCalendarDayWindow.
		*/
	~MainGroupWindow();

		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to show window.
		*/
	virtual void showWindow();
	
		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to hide window.
		*/
	virtual void hideWindow();

		/* !
		\brief
			a function generated from class MainCalendarWindow to hide window.
		*/
	void refreshUserListWindow();
	
		/* !
		\brief
			a function to refresh group list window.
		*/
	void refreshGroupEventListWindow();
	
		/* !
		\brief
			a function to refresh group name.
		*/
	void refreshGroupName();

private:
	void subscribeEvents();

	bool handle_viewGroupInfo(const CEGUI::EventArgs& args);
	bool handle_publishEvent(const CEGUI::EventArgs& args);
	bool handle_viewGroupCalendar(const CEGUI::EventArgs& args);
	bool handle_back(const CEGUI::EventArgs& args);

	bool handle_showGroupEventDescription(const CEGUI::EventArgs& args);
	bool handle_showEventMemberSituation(const CEGUI::EventArgs& args);

	bool handle_hideGroupEventDescription(const CEGUI::EventArgs& args);
	bool handle_hideEventMemberSituation(const CEGUI::EventArgs& args);

	Dater::Group* _relatedGroup;
};

#endif